<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			wx.showLoading({
				title: '加载中..',
				mask: true
			})
			//微信小程序用户及时更新到最新版本
			const updateManager = wx.getUpdateManager()
			updateManager.onCheckForUpdate(function(res) {
				// 请求完新版本信息的回调
				console.log('是否有新版本: ', +res.hasUpdate)
				if (!res.hasUpdate) {
					wx.hideLoading()
				}
			})
			updateManager.onUpdateReady(function() {
				wx.hideLoading()
				wx.showModal({
					title: '更新提示',
					content: '新版本已经准备好，是否重启应用？',
					showCancel: false,
					success: function(res) {
						if (res.confirm) {
							// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
							updateManager.applyUpdate()
						}
					}
				})
			})
			updateManager.onUpdateFailed(function() {
				wx.hideLoading();
				wx.showModal({
					title: '提示',
					content: '检查到有新版本，但下载失败，请检查网络后重试',
					showCancel: false
				})
			})
			setTimeout(wx.hideLoading, 5000)
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>
<style lang="scss">
	@import "@/common/css/audit.scss";
	@import url("/components/gaoyia-parse/parse.css");
	page{
		background-color:#040336;
		min-height: 100%;
	}
	/*   加个动画掩饰加载过程 */
	.page-fade-in {
		opacity: 0;
		transition: all 0.3s;
	}
	.status_bar {
		width: 750rpx;
		height: var(--status-bar-height);
		background: transparent !important;
	}

	/*每个页面公共css */
	.flexWarpColumn {
		display: flex;
		flex-direction: column;
	}

	.flexWarpCenterColumn {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.triangle {
		width: 0;
		height: 0;
		border: 10rpx solid transparent;
		border-top-color: #3C3C3C;
		margin-left: 10rpx;
	}

	.flexWrap {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.flexWrapNo {
		display: flex;
		align-items: center;
	}

	.topnav {
		height: var(--status-bar-height);
		background: #FFE13B;
	}

	.icon-more {
		width: 18rpx;
		height: 18rpx;
		border-radius: 2rpx;
		border-bottom: 4rpx solid #131313;
		border-left: 4rpx solid #131313;
		transform: rotate(-135deg);
		display: inline-block;
	}

	image {
		width: 100%;
		height: 100%;
	}
	.mask-wrap{
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		margin: auto;
		z-index: 99;
		background: rgba(0, 0, 0, .4);
	}
	.empty-box{
		width: 476upx;
		height: 280upx;
		margin:250upx auto;
	}
	
</style>
